package com.order.manager.Model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName shop_info
 */
@TableName(value ="shop_info")
@Data
public class ShopInfo implements Serializable {
    /**
     * 商店id
     */
    @TableId
    private String shopId;

    /**
     * 商店名称
     */
    private String shopName;

    /**
     * 商店店主
     */
    private String shopMasterId;

    /**
     * 商店介绍
     */
    private String shopIntroduce;

    /**
     * 商店头像
     */
    private String shopImg;

    /**
     * 商店状态
-1删除
0没有审核过
1正在审核
2审核未通过
3已审核通过
     */
    private Integer shopState;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date inputTime;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date updateTime;

    /**
     * 营业状态
1营业
2休业
     */
    private Integer businessState;

    /**
     * 营业开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "HH:mm", timezone = "Asia/Shanghai")
    private Date businessStartTime;

    /**
     * 营业结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "HH:mm", timezone = "Asia/Shanghai")
    private Date businessEndTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ShopInfo other = (ShopInfo) that;
        return (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
            && (this.getShopName() == null ? other.getShopName() == null : this.getShopName().equals(other.getShopName()))
            && (this.getShopMasterId() == null ? other.getShopMasterId() == null : this.getShopMasterId().equals(other.getShopMasterId()))
            && (this.getShopIntroduce() == null ? other.getShopIntroduce() == null : this.getShopIntroduce().equals(other.getShopIntroduce()))
            && (this.getShopImg() == null ? other.getShopImg() == null : this.getShopImg().equals(other.getShopImg()))
            && (this.getShopState() == null ? other.getShopState() == null : this.getShopState().equals(other.getShopState()))
            && (this.getInputTime() == null ? other.getInputTime() == null : this.getInputTime().equals(other.getInputTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getBusinessState() == null ? other.getBusinessState() == null : this.getBusinessState().equals(other.getBusinessState()))
            && (this.getBusinessStartTime() == null ? other.getBusinessStartTime() == null : this.getBusinessStartTime().equals(other.getBusinessStartTime()))
            && (this.getBusinessEndTime() == null ? other.getBusinessEndTime() == null : this.getBusinessEndTime().equals(other.getBusinessEndTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
        result = prime * result + ((getShopName() == null) ? 0 : getShopName().hashCode());
        result = prime * result + ((getShopMasterId() == null) ? 0 : getShopMasterId().hashCode());
        result = prime * result + ((getShopIntroduce() == null) ? 0 : getShopIntroduce().hashCode());
        result = prime * result + ((getShopImg() == null) ? 0 : getShopImg().hashCode());
        result = prime * result + ((getShopState() == null) ? 0 : getShopState().hashCode());
        result = prime * result + ((getInputTime() == null) ? 0 : getInputTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getBusinessState() == null) ? 0 : getBusinessState().hashCode());
        result = prime * result + ((getBusinessStartTime() == null) ? 0 : getBusinessStartTime().hashCode());
        result = prime * result + ((getBusinessEndTime() == null) ? 0 : getBusinessEndTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", shopId=").append(shopId);
        sb.append(", shopName=").append(shopName);
        sb.append(", shopMasterId=").append(shopMasterId);
        sb.append(", shopIntroduce=").append(shopIntroduce);
        sb.append(", shopImg=").append(shopImg);
        sb.append(", shopState=").append(shopState);
        sb.append(", inputTime=").append(inputTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", businessState=").append(businessState);
        sb.append(", businessStartTime=").append(businessStartTime);
        sb.append(", businessEndTime=").append(businessEndTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}